redis.replicate_commands()

local submit_key = KEYS[1]
local submit_value = ARGV[1]
local ttl=tonumber(ARGV[2])

local res=redis.call("get", submit_key)

if not res then
   redis.call("setex", submit_key, ttl, submit_value)
   return true
end

return false